﻿namespace Collaboris.Saf.Agent
{
    using Adapters;

    using Engine;
    using Engine.Report;

    public class Saf : ISaf
    {
        /// <summary>
        /// Runs the macro based on a String Representation of
        /// a Macro defined using the Spring IOC Schema.
        /// </summary>
        /// <param name="contextUrl">The context URL.</param>
        /// <param name="mode">The ProcessMode specifying whether the Macro is Do or Undo.</param>
        /// <param name="macroXml">The macro XML.</param>
        /// <returns>
        /// A MacroReport containing the outcome of running the action.
        /// </returns>
         public MacroReport RunMacro(string contextUrl, ProcessMode mode, string macroXml)
        {
            ServiceAdapter adapter = new ServiceAdapter(contextUrl, mode, macroXml);
            return adapter.RunMacro();
        }

        public void GetVersionInfo()
        {
        }
    }
}
